<?php
class users extends database{
	protected $_table = "user";
	public function checklogin($name,$pass){
		$sql = "Select * from $this->_table where user_name = '$name' and user_pass = '$pass'";
		$this->query($sql);
		if($this->num_rows()> 0){
			return $this->fetch();
			}else{
				return FALSE;
			}
		}
	public function listuser(){
		$sql = "Select * from $this->_table";
		$this->query($sql);
		return $this->fetchall();
		}
}
		
